<!DOCTYPE html>
<html>  
<head>  
<meta http-equiv="content-type" content="text/html; charset=utf-8">  
<title>position</title>  
<style type="text/css">  
    <!--  
    body{  
        font-size:12px;  
        margin:0 auto;  
    }  
  
    div#demo{  
        position:relative;  
        border:1px solid #000;  
        margin:50px;  
        top:-50px;  
        line-height:18px;  
        overflow:hidden;  
        clear:both;  
        height:1%;  
    }  
  
    div#sub{  
        position:absolute;  
        right:10px;  
        top:10px;  
    }  
  
    div.relative{  
        position:relative;  
        left:400px;  
        top:-20px;  
    }  
  
    div.static,div.fixed,div.absolute,div.relative{  
        width:300px;      
    }  
  
    div.static{  
        background-color:#bbb;  
        position:static;  
    }  
  
    div.fixed{  
        background-color:#ffc0cb;  
    }  
  
    div.absolute{  
        background-color:#b0c4de;  
    }  
  
    div.relative{  
        background-color:#ffe4e1;  
    }  
    -->  
</style>  
</head>  
<body>  
    <div id="demo">  
        <div class="static">static: 默认值。无特殊定位，对象遵循HTML定位规则 </div>  
        <div class="relative">relative:对象不可层叠，但将依据 left,right,top,bottom 等属性在正常文档流中偏移位置 </div>  
        <div class="relative">relative:对象不可层叠，但将依据 left,right,top,bottom 等属性在正常文档流中偏移位置 </div>  
        <div class="relative">relative:对象不可层叠，但将依据 left,right,top,bottom 等属性在正常文档流中偏移位置 </div>  
        <div class="relative">relative:对象不可层叠，但将依据 left,right,top,bottom 等属性在正常文档流中偏移位置 </div>  
    </div>  
</body>  
</html>  